package service.imp;

import java.util.List;
import dao.DAOFactory;
import imageUtil.Page;
import model.Revenue;
import service.RevenueService;

public class RevenueServiceImp implements RevenueService{
	public int findByCount() throws Exception{
		return DAOFactory.getRevenueDAO().findByCount();
	}
	public List<Revenue> findByAll(Page page) throws Exception{
		return DAOFactory.getRevenueDAO().findByAll(page);
	}
	@Override
	public String findDeptNameById(int id) throws Exception {
		return DAOFactory.getRevenueDAO().findDeptNameById(id);
	}
	@Override
	public boolean saveIncome(Revenue revenue) throws Exception {
		return DAOFactory.getRevenueDAO().saveIncome(revenue);
	}
	@Override
	public boolean updateIncome(Revenue revenue) throws Exception {
		return DAOFactory.getRevenueDAO().updateIncome(revenue);
	}
}
